import React, { Component } from 'react'
import { Route, Redirect, Switch } from 'react-router-dom'

import Home from './pages/home'
import Login from './pages/login'

// 测试
import Test from './pages/test'
import AuthRoute from './components/AuthRoute'

export default class App extends Component {
  render() {
    return (
      <div className="App">
        <Switch>
          <Redirect exact from="/" to="login" />
          <Route path="/home" component={Home} />
          <Route path="/login" component={Login} />

          {/* 测试用的 */}
          {/* <Route path="/test" component={Test} /> */}
          <AuthRoute path="/test" component={Test} />
        </Switch>
      </div>
    )
  }
}
